// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DataflowProfileHistory generated by hbm2java
 */
@Entity
@Table(name = "dataflow_profile_history", catalog = "magento")
public class DataflowProfileHistory implements java.io.Serializable {

	private Integer historyId;
	private DataflowProfile dataflowProfile;
	private String actionCode;
	private int userId;
	private Date performedAt;

	public DataflowProfileHistory() {
	}

	public DataflowProfileHistory(DataflowProfile dataflowProfile, int userId) {
		this.dataflowProfile = dataflowProfile;
		this.userId = userId;
	}

	public DataflowProfileHistory(DataflowProfile dataflowProfile,
			String actionCode, int userId, Date performedAt) {
		this.dataflowProfile = dataflowProfile;
		this.actionCode = actionCode;
		this.userId = userId;
		this.performedAt = performedAt;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "history_id", unique = true, nullable = false)
	public Integer getHistoryId() {
		return this.historyId;
	}

	public void setHistoryId(Integer historyId) {
		this.historyId = historyId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "profile_id", nullable = false)
	public DataflowProfile getDataflowProfile() {
		return this.dataflowProfile;
	}

	public void setDataflowProfile(DataflowProfile dataflowProfile) {
		this.dataflowProfile = dataflowProfile;
	}

	@Column(name = "action_code", length = 64)
	public String getActionCode() {
		return this.actionCode;
	}

	public void setActionCode(String actionCode) {
		this.actionCode = actionCode;
	}

	@Column(name = "user_id", nullable = false)
	public int getUserId() {
		return this.userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "performed_at", length = 19)
	public Date getPerformedAt() {
		return this.performedAt;
	}

	public void setPerformedAt(Date performedAt) {
		this.performedAt = performedAt;
	}

}
